gtk4.git
11 years agoOrganize the icons
Matthias Clasen [Sat, 24 May 2014 15:16:35 +0000 (11:16 -0400)]
Organize the icons

Sort the icon list in check-icon-theme.c, and add
comments so we have a chance of keeping the order.

11 years agoDrop an unused object
Matthias Clasen [Sat, 24 May 2014 15:06:10 +0000 (11:06 -0400)]
Drop an unused object

A downside of using templates is that we can have 'parasitic'
objects in there that don't get used for anything.

11 years agoGtkIconTheme: Add more debug spew
Matthias Clasen [Sat, 24 May 2014 15:01:27 +0000 (11:01 -0400)]
GtkIconTheme: Add more debug spew

Still trying to track down test problems in gnome-continuous.

11 years agowayland: Add support for show_window_menu
Jasper St. Pierre [Sat, 24 May 2014 03:01:27 +0000 (23:01 -0400)]
wayland: Add support for show_window_menu

11 years agoimage: Draw the image again
Benjamin Otte [Sat, 24 May 2014 17:38:56 +0000 (19:38 +0200)]
image: Draw the image again

An important line of code was removed in
54d5b426fca71dcda22ea5467054fa801556c20a that lead to an undefined
variable. Add that line back.

11 years agocombobox: Implement clip
Benjamin Otte [Sat, 24 May 2014 14:21:02 +0000 (16:21 +0200)]
combobox: Implement clip

11 years agoentry: Implement clip
Benjamin Otte [Sat, 24 May 2014 14:20:48 +0000 (16:20 +0200)]
entry: Implement clip

11 years agogestureswipe: Fix return value
Benjamin Otte [Sat, 24 May 2014 14:16:41 +0000 (16:16 +0200)]
gestureswipe: Fix return value

11 years agoimage: Remove unused variable
Benjamin Otte [Sat, 24 May 2014 14:16:32 +0000 (16:16 +0200)]
image: Remove unused variable

11 years agobutton: Implement clip
Benjamin Otte [Fri, 23 May 2014 14:01:45 +0000 (16:01 +0200)]
button: Implement clip

11 years agowidget: Include box-shadow in the clip
Benjamin Otte [Fri, 23 May 2014 13:52:16 +0000 (15:52 +0200)]
widget: Include box-shadow in the clip

This allows all widgets that implement clip to use box shadows.

11 years agowidget: Add _gtk_widget_set_css_clip()
Benjamin Otte [Wed, 21 May 2014 21:13:52 +0000 (23:13 +0200)]
widget: Add _gtk_widget_set_css_clip()

... and use it in GtkBox and GtkGrid.

11 years agospinner: Implement clip
Benjamin Otte [Mon, 19 May 2014 13:33:28 +0000 (15:33 +0200)]
spinner: Implement clip

We now allow you to gtk-icon-transform() the spinner outside of the
spinners allocation.

11 years agoAPI: widget: Add gtk_widget_set_clip() API
Benjamin Otte [Sun, 18 May 2014 14:02:04 +0000 (16:02 +0200)]
API: widget: Add gtk_widget_set_clip() API

And handle the fact that drawing bounds are now handled by this API and
the corresponding gtk_widget_get_clip().

Also add _gtk_widget_supports_clip() function to check if a widget has
been ported to the new world.

11 years agodocs: Flesh out the inspector section a bit
Matthias Clasen [Sat, 24 May 2014 14:07:46 +0000 (10:07 -0400)]
docs: Flesh out the inspector section a bit

11 years agoinspector: Make picking widgets work again
Matthias Clasen [Sat, 24 May 2014 13:54:06 +0000 (09:54 -0400)]
inspector: Make picking widgets work again

This broke when I accidentally removed the line that adds
each object to the hash table. Bring it back.

11 years agodocs: Fix make dist
Rico Tzschichholz [Sat, 24 May 2014 10:16:56 +0000 (12:16 +0200)]
docs: Fix make dist

11 years agobuild: Fix typo
Rico Tzschichholz [Sat, 24 May 2014 07:52:41 +0000 (09:52 +0200)]
build: Fix typo

11 years agogtk: Fix make dist
Rico Tzschichholz [Sat, 24 May 2014 07:24:46 +0000 (09:24 +0200)]
gtk: Fix make dist

11 years agobuild/win32: Drop a11y library references
Rico Tzschichholz [Sat, 24 May 2014 07:23:52 +0000 (09:23 +0200)]
build/win32: Drop a11y library references

In addition to  4a4b23bfad8b30372f78b75e1eb5e68279ff5b09

11 years agoUpdated POTFILES.in
Rico Tzschichholz [Sat, 24 May 2014 07:22:53 +0000 (09:22 +0200)]
Updated POTFILES.in

11 years agodocs: more input handling docs
Matthias Clasen [Sat, 24 May 2014 05:56:44 +0000 (01:56 -0400)]
docs: more input handling docs

11 years agoFix a start/end mixup
Matthias Clasen [Sat, 24 May 2014 04:47:16 +0000 (00:47 -0400)]
Fix a start/end mixup

The headerbar example in gtk3-demo was showing two start buttons
after the arrow removal.

11 years agoGtkMisc: Keep gtk_misc_set_alignment working
Matthias Clasen [Fri, 23 May 2014 09:56:52 +0000 (05:56 -0400)]
GtkMisc: Keep gtk_misc_set_alignment working

Now that labels and images no longer use x/yalign in their code,
we need to make gtk_misc_set_alignment set the h/valign for these
widgets, to keep it stumbling along until its final demise.

https://bugzilla.gnome.org/show_bug.cgi?id=730613

11 years agoGtkToolButton: Drop use of GtkMisc
Matthias Clasen [Fri, 23 May 2014 02:54:18 +0000 (22:54 -0400)]
GtkToolButton: Drop use of GtkMisc

Use h/valign instead of x/yalign.

https://bugzilla.gnome.org/show_bug.cgi?id=730613

11 years agoGtkAssistant: Drop use of GtkMisc
Matthias Clasen [Fri, 23 May 2014 02:53:52 +0000 (22:53 -0400)]
GtkAssistant: Drop use of GtkMisc

Use halign instead of xalign.

https://bugzilla.gnome.org/show_bug.cgi?id=730613

11 years agoGtkAccelLabel: Drop use of GtkMisc
Matthias Clasen [Fri, 23 May 2014 02:53:17 +0000 (22:53 -0400)]
GtkAccelLabel: Drop use of GtkMisc

Just use 0 instead of xpad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613

11 years agoGtkImage: Drop use of GtkMisc::x/yalign
Matthias Clasen [Fri, 23 May 2014 02:51:00 +0000 (22:51 -0400)]
GtkImage: Drop use of GtkMisc::x/yalign

Instead, use GtkWidget::h/valign to position the image inside
the allocation. And just stop using GtkMisc::x/ypad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613

11 years agoGtkLabel: Drop use of GtkMisc::x/yalign
Matthias Clasen [Fri, 23 May 2014 01:19:49 +0000 (21:19 -0400)]
GtkLabel: Drop use of GtkMisc::x/yalign

Instead, use GtkWidget::h/valign to position the text inside
the allocation. And just stop using GtkMisc::x/ypad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613

11 years agoFix filechooser actionbar visibility
Matthias Clasen [Sat, 24 May 2014 04:00:00 +0000 (00:00 -0400)]
Fix filechooser actionbar visibility

The actionbar was always visible, even when there is no filter
and no extra widget to show. Now we only show it when there is
something to show.

11 years agoinspector: Treat resources the same as in gtk/
Matthias Clasen [Sat, 24 May 2014 03:00:43 +0000 (23:00 -0400)]
inspector: Treat resources the same as in gtk/

11 years agoAdd two more icon names to check
Matthias Clasen [Sat, 24 May 2014 02:59:22 +0000 (22:59 -0400)]
Add two more icon names to check

These were found in the trash monitor.

11 years agoDrop no-longer-used gtkrc files
Matthias Clasen [Sat, 24 May 2014 02:00:51 +0000 (22:00 -0400)]
Drop no-longer-used gtkrc files

These were replaced by css files long ago.

11 years agoDrop a pointless function
Matthias Clasen [Sat, 24 May 2014 01:56:44 +0000 (21:56 -0400)]
Drop a pointless function

No need to have a finalize function if it just chains
up to the parent class.

11 years agoTrivial: slight code rearrangement
Matthias Clasen [Sat, 24 May 2014 01:41:58 +0000 (21:41 -0400)]
Trivial: slight code rearrangement

11 years agotests: Stop using GtkAlignment
Matthias Clasen [Sat, 24 May 2014 00:42:47 +0000 (20:42 -0400)]
tests: Stop using GtkAlignment

Fix up all other tests to not use GtkAlignment anymore.

11 years agotestadjustsize: Keep using an alignment
Matthias Clasen [Sat, 24 May 2014 00:42:01 +0000 (20:42 -0400)]
testadjustsize: Keep using an alignment

We are explicitly comparing GtkAlignment with its replacements
here.

11 years agogtk-demo: Drop use of GtkAlignment
Matthias Clasen [Wed, 14 May 2014 03:18:17 +0000 (23:18 -0400)]
gtk-demo: Drop use of GtkAlignment

11 years agoDeprecate GtkAligment
Matthias Clasen [Sat, 24 May 2014 00:09:08 +0000 (20:09 -0400)]
Deprecate GtkAligment

This has been dangling ever since 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=645781

11 years agoDrop an unneeded include
Matthias Clasen [Sat, 24 May 2014 00:04:36 +0000 (20:04 -0400)]
Drop an unneeded include

There's no GtkGesture in gtkwidget.h anymore. We do need an include
in gtkwidgetprivate.h though.

11 years agoa11y: build directly into libgtk instead of an internal library
Evan Nemerson [Fri, 23 May 2014 04:09:59 +0000 (21:09 -0700)]
a11y: build directly into libgtk instead of an internal library

https://bugzilla.gnome.org/show_bug.cgi?id=730615

11 years agoMore updates
Matthias Clasen [Fri, 23 May 2014 21:32:14 +0000 (17:32 -0400)]
More updates

11 years agoSome updates
Matthias Clasen [Fri, 23 May 2014 20:11:48 +0000 (16:11 -0400)]
Some updates

11 years agoUpdated POTFILES.in
Piotr DrÄ…g [Fri, 23 May 2014 18:48:12 +0000 (20:48 +0200)]
Updated POTFILES.in

11 years agoMerge branch 'gestures'
Carlos Garnacho [Fri, 23 May 2014 17:58:46 +0000 (19:58 +0200)]
Merge branch 'gestures'

11 years agospinbutton: Avoid touch text handles to pop up
Carlos Garnacho [Thu, 22 May 2014 14:04:03 +0000 (16:04 +0200)]
spinbutton: Avoid touch text handles to pop up

Those get in the middle more than help on these widgets, the widget
is already packed with clickable areas and having handles (and their
invisible clickable area around) hovering above don't help, plus the
purpose in most likely numeric values is a bit doubtful.

All touch events are either consumed by the up/down panels, or
the swipe gesture, all GtkEntry handling of touch events on the text
window is avoided, so handles to not appear anymore.

11 years agocolorswatch: Set gestures in GTK_PHASE_TARGET
Carlos Garnacho [Thu, 22 May 2014 13:39:31 +0000 (15:39 +0200)]
colorswatch: Set gestures in GTK_PHASE_TARGET

That's the right phase for gestures replacing entirely event handlers.

11 years agospinbutton: Use GTK_PHASE_CAPTURE for touch swipes
Carlos Garnacho [Thu, 22 May 2014 13:36:32 +0000 (15:36 +0200)]
spinbutton: Use GTK_PHASE_CAPTURE for touch swipes

The gesture must be able to catch first events for it to be seen
as recognized in event handlers.

11 years agowidget: Flip execution order of GTK_PHASE_TARGET/BUBBLE
Carlos Garnacho [Thu, 22 May 2014 13:24:28 +0000 (15:24 +0200)]
widget: Flip execution order of GTK_PHASE_TARGET/BUBBLE

the "bubble" phase used to run before event handlers before GTK_PHASE_TARGET
was added, in order to keep phases in the expected order, move GTK_PHASE_BUBBLE
to be run (still invariably) after event handlers.

The only behavioral change should be wrt widgets wanting mixed event handler/
gesture handling, they could previously attach the gesture to the bubble phase
and check for gtk_gesture_is_active() in the event handler to bail out, they'll
have to use GTK_PHASE_CAPTURE for that purpose from now on.

11 years agotexthandle: Mind the invisible area when moving the handle
Carlos Garnacho [Wed, 21 May 2014 12:58:50 +0000 (14:58 +0200)]
texthandle: Mind the invisible area when moving the handle

The handle is still centered horizontally, but the extra vertical
space wasn't taken into account, leading to misplacing the dragging
point (and the handle) during motion events.

11 years agotextview: Check first whether the sequence is handled, fetch later the event
Carlos Garnacho [Wed, 21 May 2014 12:57:07 +0000 (14:57 +0200)]
textview: Check first whether the sequence is handled, fetch later the event

And always unset/hide the selection popover if unhandled, that means the
sequence went grabbed/claimed somewhere else and cancelled here.

11 years agoentry: Check first whether the sequence is handled, fetch later the event
Carlos Garnacho [Wed, 21 May 2014 12:51:46 +0000 (14:51 +0200)]
entry: Check first whether the sequence is handled, fetch later the event

And always unset/hide the selection popover if unhandled, that means the
sequence went grabbed/claimed somewhere else and cancelled here.

11 years agogesture: Use GdkEventSequence GType in signals
Carlos Garnacho [Tue, 20 May 2014 12:10:31 +0000 (14:10 +0200)]
gesture: Use GdkEventSequence GType in signals

11 years agogesture: Introspection fixes
Carlos Garnacho [Tue, 20 May 2014 12:09:40 +0000 (14:09 +0200)]
gesture: Introspection fixes

Set annotations on return values for gtk_gesture_get_device() and
gtk_gesture_get_window().

11 years agoeventcontroller: introspection fix
Carlos Garnacho [Tue, 20 May 2014 12:08:27 +0000 (14:08 +0200)]
eventcontroller: introspection fix

Set transfer annotation on gtk_event_controller_get_widget()

11 years agogdk: Make GdkEventSequence a boxed type
Carlos Garnacho [Tue, 20 May 2014 12:07:16 +0000 (14:07 +0200)]
gdk: Make GdkEventSequence a boxed type

Not much to copy nor free, but this'll make bindings happy

11 years agopaned: Handle pointer events from touchscreen devices
Carlos Garnacho [Mon, 19 May 2014 21:02:49 +0000 (23:02 +0200)]
paned: Handle pointer events from touchscreen devices

GtkPaned may just capture pointer events because the child widget
doesn't happen to have GDK_TOUCH_MASK set, resort to checking the
device in that case.

11 years agoDocs: Cosmetic fixes
Matthias Clasen [Tue, 20 May 2014 02:16:03 +0000 (22:16 -0400)]
Docs: Cosmetic fixes

11 years agodocs: Correct a reference
Matthias Clasen [Tue, 20 May 2014 01:46:30 +0000 (21:46 -0400)]
docs: Correct a reference

11 years agoRevert "docs: GtkEventController was dropped from public api"
Matthias Clasen [Tue, 20 May 2014 01:41:35 +0000 (21:41 -0400)]
Revert "docs: GtkEventController was dropped from public api"

This reverts commit eefac03b395a6b885fd61c100b48652200beb996.

11 years agoRevert "docs: More GtkEventController removal"
Matthias Clasen [Tue, 20 May 2014 01:41:21 +0000 (21:41 -0400)]
Revert "docs: More GtkEventController removal"

This reverts commit 75f503fb1fc9068c9e1a0d02126c55addbe8eb3e.

11 years agoDocs: Add information about event propagation
Matthias Clasen [Tue, 20 May 2014 01:24:46 +0000 (21:24 -0400)]
Docs: Add information about event propagation

11 years agoDocs: Minor changes
Matthias Clasen [Tue, 20 May 2014 00:45:42 +0000 (20:45 -0400)]
Docs: Minor changes

11 years agoDocument gtk_gesture_set_state
Matthias Clasen [Tue, 20 May 2014 00:17:12 +0000 (20:17 -0400)]
Document gtk_gesture_set_state

11 years agodocs: gtk_gesture_cancel_sequence was made private
Matthias Clasen [Tue, 20 May 2014 00:10:48 +0000 (20:10 -0400)]
docs: gtk_gesture_cancel_sequence was made private

11 years agodocs: More GtkEventController removal
Matthias Clasen [Tue, 20 May 2014 00:00:31 +0000 (20:00 -0400)]
docs: More GtkEventController removal

11 years agodocs: GtkEventController was dropped from public api
Matthias Clasen [Mon, 19 May 2014 23:37:16 +0000 (19:37 -0400)]
docs: GtkEventController was dropped from public api

11 years agopaned: Use GtkGesture to handle handle dragging
Carlos Garnacho [Mon, 19 May 2014 17:58:54 +0000 (19:58 +0200)]
paned: Use GtkGesture to handle handle dragging

Dragging is all handled by a GtkGesturePan now, matching the
paned orientation.

On touch events, a wider area is listened for, so touch events
don't need to be as accurate to initiate dragging, if no dragging
is truly initiated in this case, events are just forwarded for
child widgets to handle.

11 years agoswitch: Use GtkGesture to handle input events
Carlos Garnacho [Mon, 19 May 2014 14:08:56 +0000 (16:08 +0200)]
switch: Use GtkGesture to handle input events

A pan gesture is used to handle switch dragging, which is only triggered
by horizontal panning movements. A multipress gesture handles the cases
where clicking without dragging happens, just toggling the switch.

11 years agoinspector: Add more complete gesture support
Matthias Clasen [Fri, 16 May 2014 23:44:43 +0000 (19:44 -0400)]
inspector: Add more complete gesture support

Add a dedicated tab that shows how gestures are grouped,
and allows changing the propagation phase.

11 years agoinspector: Minimal support for gestures
Matthias Clasen [Fri, 16 May 2014 18:27:58 +0000 (14:27 -0400)]
inspector: Minimal support for gestures

We're just showing them as objects in the tree, for now.

11 years agoAdd back a private api to list controllers
Matthias Clasen [Fri, 16 May 2014 17:14:13 +0000 (13:14 -0400)]
Add back a private api to list controllers

This will let us show them in the inspector.

11 years agotexthandle: Make a bigger hit area around texthandles
Carlos Garnacho [Fri, 16 May 2014 17:59:31 +0000 (19:59 +0200)]
texthandle: Make a bigger hit area around texthandles

The hit area now extends to all sides around the handle, instead
of just towards where the text is. This makes it easier to grab
handles once shown.

11 years agogesture: Declare GtkGesture:window as an object property
Carlos Garnacho [Fri, 16 May 2014 17:35:08 +0000 (19:35 +0200)]
gesture: Declare GtkGesture:window as an object property

11 years agowidget: 3-way merge ate my g_object_ref()
Carlos Garnacho [Fri, 16 May 2014 16:58:11 +0000 (18:58 +0200)]
widget: 3-way merge ate my g_object_ref()

Move it to the right place.

11 years agoscrolledwindow: Handle directional cancellation if there is a single scroll direction
Carlos Garnacho [Fri, 16 May 2014 16:35:45 +0000 (18:35 +0200)]
scrolledwindow: Handle directional cancellation if there is a single scroll direction

A pan gesture is optionally attached if there is only one scrolling direction, the pan
gesture orientation is changed so movements tangential to the scroll direction get
scrolling cancelled (The pan gesture is automatically denied when that happens, and
that state change spreads to the others gestures in the group). If the pan direction
happens in the expected directions, no cancellation happens, and scrolling eventually
takes place.

11 years agowidget: remove check on whether the controller was already added
Carlos Garnacho [Fri, 16 May 2014 16:34:15 +0000 (18:34 +0200)]
widget: remove check on whether the controller was already added

Multiple calls are supposedly allowed to change the phase (although
unlikely to happen), so remove the g_return_if_fail() checking whether
the controller was already added.

11 years agopan: Remove wrong check
Carlos Garnacho [Fri, 16 May 2014 16:33:05 +0000 (18:33 +0200)]
pan: Remove wrong check

From the very early days where there were a NONE=0 GtkPanOrientation
value. This makes vertical pan operations work as expected.

11 years agoentry: Ensure the cursor text handle is shown after touching to reposition cursor.
Carlos Garnacho [Fri, 16 May 2014 15:46:12 +0000 (17:46 +0200)]
entry: Ensure the cursor text handle is shown after touching to reposition cursor.

11 years agopopover: Hide widget first when disposing
Carlos Garnacho [Fri, 16 May 2014 15:38:28 +0000 (17:38 +0200)]
popover: Hide widget first when disposing

In order to ensure invariants are kept.

11 years agoentry: Obey implementations' frame when placing handles/popovers around
Carlos Garnacho [Fri, 16 May 2014 15:36:59 +0000 (17:36 +0200)]
entry: Obey implementations' frame when placing handles/popovers around

Y=0 was assumed in a few places, not necessarily right on eg. vertical
spinbuttons.

11 years agoentry: Improve touch popover interaction
Carlos Garnacho [Fri, 16 May 2014 15:35:53 +0000 (17:35 +0200)]
entry: Improve touch popover interaction

Presses alternatively show and dismiss the popover, the popover is still
always shown invariably after any dragging happens (either text selection,
or dragging a text handle)

11 years agotextview: Show the magnifier popover a bit farther from the touch position
Carlos Garnacho [Fri, 16 May 2014 15:32:59 +0000 (17:32 +0200)]
textview: Show the magnifier popover a bit farther from the touch position

Somewhat arbitrary at the moment, would be nice to have minimal units
support for this, or at least hidpi support.

11 years agotextview: Improve touch popover interaction
Carlos Garnacho [Fri, 16 May 2014 15:27:42 +0000 (17:27 +0200)]
textview: Improve touch popover interaction

Presses alternatively show and dismiss the popover, the popover is still
always shown invariably after any dragging happens (either text selection,
or dragging a text handle)

11 years agoentry: Use gestures to handle pointer/touch events
Carlos Garnacho [Thu, 15 May 2014 13:03:18 +0000 (15:03 +0200)]
entry: Use gestures to handle pointer/touch events

Similarly to GtkTextView, a GtkGestureMultiPress gesture handles
button/touch presses to initiate one selection mode or other, and
a GtkGestureDrag is used to handle text selection and DnD checks.

The code from button press/release, motion, and grab_notify handlers
has been shuffled into the actions triggered by those gestures.

11 years agospinbutton: Attach "swipe to spin" controllers to the bubble phase
Carlos Garnacho [Wed, 14 May 2014 11:05:41 +0000 (13:05 +0200)]
spinbutton: Attach "swipe to spin" controllers to the bubble phase

It is unnecessary to have those process events manually, just attach
those to the bubble phase.

11 years agocolorplane: Fully port to GtkGesture
Carlos Garnacho [Wed, 14 May 2014 10:56:16 +0000 (12:56 +0200)]
colorplane: Fully port to GtkGesture

A GtkGestureDrag is used for color selection, removing also the
need to track the pointer state in widget data. The GDK grab performed
just to set the crosshair cursor has been replaced by a call
to gdk_window_set_device_cursor(), which will be unset if the
drag operation is finished, or cancelled due to the implicit grab
being broken.

11 years agogdk: Lookup both device and global cursor when checking up the hierarchy
Carlos Garnacho [Wed, 14 May 2014 10:53:54 +0000 (12:53 +0200)]
gdk: Lookup both device and global cursor when checking up the hierarchy

When the pointer cursor is updated on CSW, lookup for either a device
cursor, or a global one. It would previously lookup for windows with
a global cursor, and then check if it had a device cursor, which would
skip windows with only device cursors set, and unexpectedly set the
global cursor.

11 years agobutton: Make multipress gesture exclusive
Carlos Garnacho [Mon, 12 May 2014 17:52:35 +0000 (19:52 +0200)]
button: Make multipress gesture exclusive

We only want actions to be triggered by a single sequence there,
so buttons trigger no actions on further simultaneous touches
happening.

11 years agogesturesingle: Add an "exclusive" boolean property
Carlos Garnacho [Mon, 12 May 2014 17:50:26 +0000 (19:50 +0200)]
gesturesingle: Add an "exclusive" boolean property

All "exclusive" gestures listen for either pointer events, or
"pointer emulating" touch events, so only a single sequence at
a time can make these run.

11 years agobutton: Use GtkGestureMultiPress for signal emission
Carlos Garnacho [Mon, 12 May 2014 17:12:27 +0000 (19:12 +0200)]
button: Use GtkGestureMultiPress for signal emission

It is now useful for that purpose with a ::release signal, so replace
the custom GtkGestureSingle with one of these.

11 years agodrag: Allow gtk_gesture_get_start_point/offset() to be called on ::drag-end
Carlos Garnacho [Mon, 12 May 2014 17:11:53 +0000 (19:11 +0200)]
drag: Allow gtk_gesture_get_start_point/offset() to be called on ::drag-end

11 years agomultipress: Add matching ::released signal
Carlos Garnacho [Mon, 12 May 2014 15:02:03 +0000 (17:02 +0200)]
multipress: Add matching ::released signal

This signal will always be paired with a ::pressed signal, unless
the sequence is cancelled, or the controller is reset. the n_press
argument in the signal always matches the ::press signal one, even
if GtkGestureMultiPress::stopped was emitted in between.

11 years agomultipress: Protect against fleeting touches mistriggering events
Carlos Garnacho [Mon, 12 May 2014 14:56:41 +0000 (16:56 +0200)]
multipress: Protect against fleeting touches mistriggering events

The current sequence (as per gtk_gesture_single_get_current_sequence)
is used to find out the coordinates. And only emit ::pressed if the
gesture began through a GDK_BUTTON_PRESS/TOUCH_BEGIN (eg. not due to
an extra touch being lifted)

11 years agotextview: Set up controllers on the GTK_PHASE_TARGET propagation phase
Carlos Garnacho [Sat, 10 May 2014 18:59:55 +0000 (20:59 +0200)]
textview: Set up controllers on the GTK_PHASE_TARGET propagation phase

This way events are managed by gestures in the event handlers themselves,
respecting the execution order already assumed by subclasses around.

11 years agowidget: Hook GTK_PHASE_TARGET controllers to the default event handlers
Carlos Garnacho [Sat, 10 May 2014 18:52:17 +0000 (20:52 +0200)]
widget: Hook GTK_PHASE_TARGET controllers to the default event handlers

Just call the controllers on that phase if the default widget handlers
are run.

For compatibility reasons, in the touch event handler, let the pointer
emulating touch be transformed to a pointer event as usual, in order to
have widget handlers a chance to run at all. If they have to be managed
by a controller in that phase, it'll have to be through the default pointer
event handlers.

11 years agogesture: Add GTK_PHASE_TARGET
Carlos Garnacho [Sat, 10 May 2014 18:50:23 +0000 (20:50 +0200)]
gesture: Add GTK_PHASE_TARGET

This phase is meant to run in the default widget handlers, as opposed
to externally as in the bubble/capture phase. This will be most usually
the expected phase for every controller replacing code in event handlers
in GTK+, just so invocation and triggering order is kept unaltered.

11 years agogesture: Handle GdkEventGrabBroken
Carlos Garnacho [Sat, 10 May 2014 18:46:47 +0000 (20:46 +0200)]
gesture: Handle GdkEventGrabBroken

That may happen separately from grab-notify, and also due to external
reasons, so ensure all sequences are cancelled if a grab is taken
in some GdkWindows that would obscure events on the controller.

11 years agoGtkColorSwatch: Use gesture for button events too
Matthias Clasen [Fri, 9 May 2014 23:24:27 +0000 (19:24 -0400)]
GtkColorSwatch: Use gesture for button events too

11 years agoGtkWindow: Only use a multipress gesture for toplevels
Matthias Clasen [Fri, 9 May 2014 22:55:48 +0000 (18:55 -0400)]
GtkWindow: Only use a multipress gesture for toplevels

There is no point in creating and attaching this gesture
for override-redirect windows, so don't do it.